import requests
from bs4 import BeautifulSoup


def is_item_tag(tag):
    if tag.name != "a" or tag.get("class") is None or not tag.has_attr("_stat2"):
        return False
    if "item" in tag.get("class") and tag.get("_stat2").startswith("filter:params"):
        return True
    else:
        return False
html = requests.get("https://v.qq.com/x/list/movie?offset=0&iyear=4330")
soup = BeautifulSoup(html.text, features="lxml")
tags = soup.find_all(name=is_item_tag)
print(tags)
# for tag in tags:
#     print(tag.get("href"))
